package app.server.project.main.service.dto.room;

import app.server.project.main.service.db.entity.RoomEntity;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import jakarta.persistence.Column;
import jakarta.persistence.Id;
import lombok.Data;
import org.hibernate.annotations.Comment;

import java.time.LocalDateTime;

@Data
public class RoomInfoDto {
    /**
     * 房间id,唯一
     */
    private long id;
    /**
     * 房间名称
     */
    private String name;

    public static RoomInfoDto of(RoomEntity roomEntity){
        var room=new RoomInfoDto();
        BeanUtil.copyProperties(roomEntity,room,true);
        return room;
    }
}
